package com.singfan.manage.vm;

import com.singfan.manage.vm.partial.ShopListItem;

import java.util.List;

/**
 * Author: hansonghe
 * Date: 2015-10-20 15:25
 * Desc:
 */
public class ShopListModel extends ViewModelBase {
    private String shopData;

    public String getShopData() {
        return shopData;
    }

    public void setShopData(String shopData) {
        this.shopData = shopData;
    }

    public static ShopListModel createWithItemList(List<ShopListItem> shopListItemList){
        ShopListModel shopListModel = new ShopListModel();

        StringBuilder stringBuilder = new StringBuilder();
        for (ShopListItem shopListItem : shopListItemList){
            stringBuilder.append(shopListItem.toString());
        }
        shopListModel.setShopData(stringBuilder.toString());

        return shopListModel;
    }
}
